/*
 */
package com.alfareal.glass.camera;
import com.alfareal.glass.camera.CameraAppImpl;
import android.content.BroadcastReceiver;
import android.provider.MediaStore;
import android.util.Log;
import android.content.Context;
import android.content.Intent;
import android.content.ComponentName;
import android.media.AudioManager;
import com.smartglass.alfareallive.CameraRTMPLive;


/**  */
public class CameraButtonIntentReceiver extends BroadcastReceiver {

    private static final String TAG = "ButtonIntentReceiver";

	private final String ALFA_KEY = "com.ingenic.glass.camera.AlfaLive";

    @Override
	public void onReceive(Context context, Intent intent) {

	if (CameraAppImpl.DEBUG)
		Log.d(TAG, "onReceive in");
	if (MediaStore.ACTION_IMAGE_CAPTURE.equals(intent.getAction())) {
	    // short press key
	    if (CameraAppImpl.DEBUG)
			Log.d(TAG, "Action is ACTION_IMAGE_CAPTURE.");
		if (null != CameraRTMPLive.getMInstance()) {
			CameraRTMPLive.getMInstance().finish();
	    }
	} else if (MediaStore.ACTION_VIDEO_CAPTURE.equals(intent.getAction())) {

		    
	}
	else if (this.ALFA_KEY.equals(intent.getAction())) {

		    }
    }
}
